Partial Evaluation for Program Analysis

نویسندگان

  • Daniel Damian
  • Olivier Danvy
چکیده

Preface This report documents the scientific work carried out during the part A of the Ph.D. studies of author at BRICS 1. The main topic of interest is programming languages, focusing on partial evaluation and program transformation. One of the ideas explored in the period was to assess the impact of partial evaluation on program analysis. The present report makes an account of the results obtained, from both theoretical and practical points of view. The report presents a case study of partial evaluation in program analysis. Starting from the observation that abstract interpretation incurs an interpretive overhead in the same way as a standard interpretation, we explore the benefits that can be obtained from specializing an abstract interpretation-based program analysis with respect to the source program. The contribution of our work is to present a complete formal account of Shivers's 0-CFA implementation and specialization. In the first chapters of the report, we point out a missing link between the formal specification of Shivers's 0-CFA and its implementation. We fill this gap by formally relating the specification with the formalization of the implementation. Both implementation and specialization are formalized within a unified programming-language framework. We formally specify an implementation language, thus making it possible to prove correctness of both implementation and specialization. The former is done by formally relating the semantics of the program implementing the analysis to the specification of the analysis. The later is done by establishing meaning-preserving program transformations which lead to program specialization. We thus obtain a correct specialized analyzer by means of simple program transformations. The motivation of this work is to build a complete theoretical foundation of an idea which can prove useful in practice. Our approach constructs a formal connection between a mathematical solution to a problem, its practical implementation, and the improvement obtained by specialization. Acknowledgments I would like to thank my supervisor Olivier Danvy for the numerous discussions and for his valuable comments about my work. I am also grateful to Andrzej Filinski for his courses at DAIMI and for his numerous suggestions. Thanks are also due to Dominique Boucher, who generously provided the source of his benchmarks. I would also like to thank Torben Amtoft for his collaboration during his stay at BRICS. Finally I thank Bernd Grobauer and Zhe Yang for both their help and enjoyable company.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

From Mid-Level Policy Analysis to Macro-Level Political Economy; Comment on “Developing a Framework for a Program Theory-Based Approach to Evaluating Policy Processes and Outcomes: Health in All Policies in South Australia”

This latest contribution by the evaluation research team at Flinders University/Southgate Institute on their multiyear study of South Australia’s Health in All Policies (HiAP) initiative is simultaneously frustrating, exemplary, and partial. It is frustrating because it does not yet reveal the extent to which the initiative achieved its stated outcomes; that awaits further papers. It is exempla...

متن کامل

Towards Predicting the Effectiveness of Partial Evaluation

Recent approaches to partial evaluation—a well-known technique for program specialization—include a so called size-change analysis for ensuring the termination of the process. This paper presents a novel application of size-change analysis for predicting the effectiveness of partial evaluation. Size-change analysis is based on computing an approximation of the program loops. Here, we present an...

متن کامل

Developing a Critical Checklist for Textbook Evaluation

This study has been carried out to develop a critical checklist for global/commercial textbooks which play a crucial role in language teaching/learning. For this aim, a number of items have been developed based on a comprehensive review of the related literature and experts’ opinions. The tentative checklist was administered to the targeted population, yet 326 checklists were deemed appropriate...

متن کامل

Partial Evaluation of Higher-Order Natural-Semantics Derivations

We use on-line partial-evaluation technology to generate partial derivations from natural (big-step) semantics deenitions. First, we reformat the big-step rules into a small-step form, and we extend big-step semantics to be higher-order, that is, we allow data structures like closures to contain partial derivations. Next, we apply a supercompilation algorithm to the transformed semantics, there...

متن کامل

Trace Analysis for Predicting the Effectiveness of Partial Evaluation

The main goal of partial evaluation [3] is program specialization. Essentially, given a program and part of its input data—the so called static data—a partial evaluator returns a new, residual program which is specialized for the given data. An appropriate residual program for executing the remaining computations—those that depend on the so called dynamic data—is thus the output of the partial ...

متن کامل

On Static and Dynamic Control-Flow Information in Program Analysis and Transformation

This thesis addresses several aspects of static and dynamic control-flow information in programming languages, by investigating its interaction with program transformation and program analysis. Control-flow information indicates for each point in a program the possible program points to be executed next. Control-flow information in a program may be static, as when the syntax of the program dire...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1998